import axios from 'axios';
import {Indicator} from "mint-ui";
export function request(config){
    const instance = axios.create({
        baseURL:'https://autumnfish.cn/',
        withCredentials: true
    });
    instance.interceptors.request.use((config)=>{
        Indicator.open({
            text:"加载中...",
            spinnerType:"double-bounce"
        });
        return config
    });
    instance.interceptors.response.use((res)=>{
        Indicator.close();
        return res.data
    });
    return instance(config).catch(error=>{
        Indicator.close();
    });
}